<div id="page-wrapper">
    <div class="row">
		<div class="col-lg-12">
			<h3 class="page-header">
                编辑报名
			</h3>
		</div>
	</div>	
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h5>基本信息</h5>
                </div>
                <div class="panel-body">
                    <!--<div class="row">
                        <div class="col-lg-12">-->
                            <form role="form" action="{:U('User/Enroll/update')}" method="post" enctype="multipart/form-data">
                                <present name="enroll.id">
                                    <input type="hidden" name="id" value="{$enroll['id']}">
                                <else />
                                    <input type="hidden" name="id" value="-1">
                                </present>
                                <div class="form-group">
                                    <label>活动名称</label>
                                    <present name="enroll.title">
                                        <input class="form-control" name="title" value="{$enroll['title']}" placeholder="请输入活动名称">
                                    <else />
                                        <input class="form-control" name="title" placeholder="请输入活动名称">
                                    </present>
                                </div>

                                <div class="form-group">
                                    <label>主题图片</label>
                                    <present name="enroll.headimg">
                                    <img src="/{$enroll['headimg']}" class="thumbnail" width="100%" height="320px" data-preview="uploadFile">
                                        <input type="hidden" name="picurl" value="{$enroll['headimg']}" data-set="uploadFile">
                                        <input class="form-control" type="file" class="changePic" data-action="uploadFile">
                                    <else />
                                        <img src="" class="thumbnail preview" width="100%" height="320px" data-preview="uploadFile">
                                        <input class="form-control" name="picurl" type="file" data-action="uploadFile">
                                    </present>
                                    
                                </div>

                                <div class="form-group">
                                    <label>简介</label>
                                    <present name="enroll.info">
                                        <textarea class="form-control" rows="3" name="info" >{$enroll['info']}</textarea>
                                    <else />
                                        <textarea class="form-control" rows="3" name="info" ></textarea>
                                    </present>
                                </div>
                                <div class="form-group">
                                    <label>关键字</label>
                                    <present name="enroll.keyword">
                                    <input class="form-control" name="keyword" value="{$enroll['keyword']}" placeholder="请输入关键字">
                                    <else />
                                    <input class="form-control" name="keyword" value="" placeholder="请输入关键字">
                                    </present>
                                </div>
                                <div class="form-group">
                                    <label>活动开始时间</label>
                                    <present name="enroll.begin_time">
                                        <input class="form-control date-picker" name="begin_time" value="{$enroll['begin_time']|date='Y-m-d H:i:s', ###}" placeholder="请输入活动开始时间">
                                    <else />
                                        <input class="form-control date-picker" name="begin_time" value="" placeholder="请输入活动开始时间">
                                    </present>
                                </div>
                                <div class="form-group">
                                    <label>活动结束时间</label>
                                    <present name="enroll.end_time">
                                        <input class="form-control date-picker" name="end_time" value="{$enroll['end_time']|date='Y-m-d H:i:s', ###}" placeholder="请输入活动结束时间">
                                    <else />
                                        <input class="form-control date-picker" name="end_time" value="" placeholder="请输入活动结束时间">
                                    </present>
                                </div>
       
                                <button type="submit" class="btn btn-default">提交</button>
                            </form>

                            <!-- </div>
                    </div> -->
                    <!-- /.row (nested) -->
                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->
        </div>
        <!-- /.col-lg-12 -->
    </div>
</div>
        <!-- /#page-wrapper -->
<script type="text/javascript" src="/Public/js/common.upload.js"></script>
<script type="text/javascript">
    common.upload.img.init();
</script>
<!-- <script type="text/javascript" src="/Public/js/jquery-ui.js" ></script> -->
<script type="text/javascript" src="/Public/js/laydate/laydate.js"></script>
<script type="text/javascript">

$( ".date-picker" ).bind( "click", function(){
    laydate( {
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        //choose: function(datas){
         //end.min = datas; //开始日选好后，重置结束日的最小日期
         //end.start = datas //将结束日的初始值设定为开始日
        //}
    } );
    laydate.skin( "molv" );
} );

</script>
